﻿
namespace FxArchitect
{
    public class XEffectErrorOrWarning
    {
        /// <summary>
        /// Source of the error or warning.
        /// </summary>
        public FxInfo Source { get; set; }
        /// <summary>
        /// Plain text description of the error or warning.
        /// </summary>
        public string Description { get; set; }
        /// <summary>
        /// Filename where the error or warning originated.
        /// </summary>
        public string File { get; set; }
        /// <summary>
        /// (Optional) Line where the error or warning occurred.
        /// </summary>
        public string Line { get; set; }
        /// <summary>
        /// (Optional) Column on the line where the error or warning occurred.
        /// </summary>
        public string Column { get; set; }
        /// <summary>
        /// Filename of the file that began the compilation.
        /// </summary>
        public string Root { get; set; }

        public string Type { get; set; }
        /// <summary>
        /// Was this a warning? If not it's an error.
        /// </summary>
        public bool IsWarning { get; set; }
        /// <summary>
        /// Was this an error? If not it's a warning.
        /// </summary>
        public bool IsError { get { return !IsWarning; } set { IsWarning = !value; } }
    }
}
